package cn.trigram.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.view.JstlView;

@Slf4j
@Configuration
public class MvcConfig {

  @Bean
  public ViewResolver internalResourceViewResolver() {

    log.info("---> internalResourceViewResolver");
    InternalResourceViewResolver viewResolver = new InternalResourceViewResolver("/WEB-INF/",
        ".jsp");
    viewResolver.setViewClass(JstlView.class);
    return viewResolver;
  }

}
